<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <meta name="description" content="<?php echo ($site_conf["setting_site_title"]); ?>">
    <meta name="author" content="CDCT TEAM.">
    <title>系统后台－站点配置</title>
    
    <link type="text/css" rel="stylesheet" href="/static/common/style/reset.css" />
    <link type="text/css" rel="stylesheet" href="/static/admin/style/basic.css"/>
    <style type="text/css">html,body{height:100%;}html{height:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}</style>
    
</head>
<body>

    <div class="wrap-page">
        <div id="pageConfigSite" class="page-content">
            <?php if(!empty($dataMenus)): ?><div class="tabs">
    <div class="tabs-title clearfix">
        <ul>
            <?php if(is_array($dataMenus)): foreach($dataMenus as $key=>$vo): ?><li <?php if($action_name == $vo['action_name']): ?>class="current"<?php endif; ?>><a href="<?php echo U('backend/'.$vo['module_name'].'/'.$vo['action_name'],array('menuid' => $menu_id)); ?>"><?php echo ($vo["name"]); ?></a></li><?php endforeach; endif; ?>
        </ul>
    </div>
</div><?php endif; ?>
            <form class="form default-style" enctype="multipart/form-data" role="form" id="setting_site_form" action="<?php echo u('backend/settings/index');?>" method="post">
                <div id="boxConfigSite" class="box">
                    <div class="box-content">

                        <dl class="clearfix">
                            <dt><label>网站Title：</label></dt>
                            <dd>
                                <div class="item-field clearfix">
                                    <input  type="text" class="textfield" value="<?php echo ($list["setting_site_title"]["data"]); ?>" name="setting_site_title" id="setting_site_title"
                                            placeholder="请输入网站Title" />
                                </div>
                            </dd>
                        </dl>
                        <dl class="clearfix">
                            <dt><label>网站域名：</label></dt>
                            <dd>
                                <div class="item-field clearfix">
                                    <input type="text" class="textfield" value="<?php echo ($list["setting_site_domain"]["data"]); ?>" name="setting_site_domain" id="setting_site_domain"
                                           placeholder="请输入网站域名"/>
                                </div>
                                <div class="item-prompt">提示：请以“/”结尾</div>
                            </dd>
                        </dl>

                        <dl class="clearfix">
                            <dt><label>网站状态：</label></dt>
                            <dd>
                                <div class="item-field clearfix">
                                    <label class="checkbox-inline">
                                        <input type="radio" name="setting_site_status"  value="1" <?php if($list['setting_site_status']['data'] == '1'): ?>checked="checked"<?php endif; ?>>启用
                                    </label>
                                    <label class="checkbox-inline">
                                        <input type="radio" name="setting_site_status" value="0" <?php if($list['setting_site_status']['data'] == '0'): ?>checked="checked"<?php endif; ?> >关闭
                                    </label>
                                </div>
                            </dd>
                        </dl>

                        <dl class="clearfix">
                            <dt><label>开放注册：</label></dt>
                            <dd>
                                <div class="item-field clearfix">
                                    <label class="checkbox-inline">
                                        <input type="radio" name="setting_site_register"  value="1" <?php if($list['setting_site_register']['data'] == '1'): ?>checked="checked"<?php endif; ?>>是
                                    </label>
                                    <label class="checkbox-inline">
                                        <input type="radio" name="setting_site_register" value="0" <?php if($list['setting_site_register']['data'] == '0'): ?>checked="checked"<?php endif; ?> >否
                                    </label>
                                </div>
                            </dd>
                        </dl>

                        <dl class="clearfix">
                            <dt><label>备案信息：</label></dt>
                            <dd>
                                <div class="item-field clearfix">
                                    <textarea  class="textarea" name="setting_site_mark" id="setting_site_mark"
                                               placeholder="请输入网站备案信息"><?php echo ($list["setting_site_mark"]["data"]); ?></textarea>
                                </div>
                                <!--<div class="item-prompt">提示：页面meta标签对关键字内容的描述(description)，搜索引擎优化使用</div>-->
                            </dd>
                        </dl>

                        <dl class="clearfix">
                            <dt><label>站长邮箱：</label></dt>
                            <dd>
                                <div class="item-field clearfix">
                                    <input type="text" class="textfield" value="<?php echo ($list["setting_site_admin_email"]["data"]); ?>" name="setting_site_admin_email" id="setting_admin_email"
                                           placeholder="请输入站长邮箱"/>
                                </div>
                                <div class="item-prompt">提示：请输入正确的邮箱</div>
                            </dd>
                        </dl>

                        <dl class="clearfix">
                            <dt><label>统计代码：</label></dt>
                            <dd>
                                <div class="item-field clearfix">
                                    <textarea class="textarea" rows="3" name="setting_site_count_code" placeholder="请输入统计代码"><?php echo ($list["setting_site_count_code"]["data"]); ?></textarea>
                                </div>
                            </dd>
                        </dl>

                        <dl class="clearfix">
                            <dt><label>版权信息：</label></dt>
                            <dd>
                                <div class="item-field clearfix">
                                    <textarea class="textarea" name="setting_site_copyright" rows="3" placeholder="请输入版权信息"><?php echo ($list["setting_site_copyright"]["data"]); ?></textarea>
                                </div>
                                <div class="item-prompt"></div>
                            </dd>
                        </dl>

        </div>
    </div>
    <div class="page-buttons clearfix">
        <div class="fl-l">
            <button type="button" class="setting-btn button button-blue">保存</button>
        </div>
    </div>
    </form>
    </div>
    </div>

<script type="text/javascript" src="/static/common/script/jquery-1.11.1.min.js"></script>
<script src="/static/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript" src="/static/admin/script/common.js"></script>
<script type="text/javascript" src="/static/admin/script/listTable.js"></script>

    <script>
        $(document).ready(function(){
            $('.setting-btn').click(function(){
                var form_id = $(this).parents('form').prop('id');
                //数据验证
                $.ajax({
                    type: "POST",
                    url: $('#'+form_id).attr('action'),
                    data: $('#'+form_id).serialize(),
                    dataType: "json",
                    success:function(data){
                        if(data.status)
                        {
                            layer.msg(data.msg,{offset:[150],icon: 1,time:2000, shade: [0.1, '#ccc']});
                        } else {
                            layer.msg(data.msg,{offset:[150],icon: 2,time:2000, shade: [0.1, '#ccc']})
                        }

                    }
                });
                return false;
            });
        });
    </script>

</body>
</html>